import { Form, Button, Popconfirm, message, Col } from "antd";
import { useNavigate } from "react-router-dom";
interface FormItemButtonProps {
    onConfirm: Function
    onReset: Function,
    offset?:number
}

const FormItemButton = (props: FormItemButtonProps) => {
    const navigate = useNavigate();
    const onReset = () => {
            props.onReset();
    }
    const onComfirm = () => {
            props.onConfirm();
    }

    return (
        <Col style={{ margin: "16px 0" }}>
            <Form.Item wrapperCol={{offset: props.offset }}>
                <Button size="small" onClick={onReset}  style={{ marginRight: 20}}>重置</Button>
                <Button size="small" onClick={onComfirm} type="primary" style={{ color: '#FFFFFF' }}>确认</Button>
            </Form.Item>

        </Col>
    )
}
export default FormItemButton;
export type { FormItemButtonProps };